import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * Created by Administrator on 2022/10/8.
 */
public class Test {
    public static void main(String[] args) {
        Pokers pokers = new Pokers();
        pokers.buyPokers();//买牌
        System.out.println(pokers.getPokers());
        //打牌人
        List<List<Poker>> personPoker = new ArrayList<>();
        List<Poker> personPoker1 = new ArrayList<>();
        List<Poker> personPoker2 = new ArrayList<>();
        List<Poker> personPoker3 = new ArrayList<>();
        personPoker.add(personPoker1);
        personPoker.add(personPoker2);
        personPoker.add(personPoker3);

        //洗牌
        Random random = new Random();
        int tmp = pokers.getPokers().size();
        for (int i = 0; i < tmp; i++) {
            int a = random.nextInt(tmp);
            int b = random.nextInt(tmp);
            pokers.setPokers(a,b);
        }
        System.out.println(pokers.getPokers());

        //发牌
        for (int i = 0; i < pokers.getPokers().size(); i++) {
            for (int j = 0; j < personPoker.size(); j++) {
                Poker p = pokers.getPokers().remove(0);
                personPoker.get(j).add(p);

            }
        }
        for (int i = 0; i < personPoker.size(); i++) {
            System.out.println(personPoker.get(i));
        }
    }
}
